<?php

$array = array(
    array(
        'if_show' => 1,
        'name' => 'zhangsan'
    ), array(
        'if_show' => 2,
        'name' => 'lisi'
    )
);

foreach ($array as $key=>$value){
     if($value['if_show']==1){
         return 1;
     }

}